#!/usr/bin/env python
# -*- coding:utf-8 -*-
"""
# @FileName  :login.py
# @Time      :2022/4/28 3:54 PM
# @Author    :Toliong toliong@foxmail.com
"""
from sqlalchemy.orm import Session
from db.models.users import User


def get_user(username: str, db: Session):
    user = db.query(User).filter(User.email == username).first()
    return user
